<!DOCTYPE html>
<html>
<head>
    <title>公告</title>
    <meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="Author" content="larry" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../statics/common/cascader/cascader/cascader.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/autocomplete.css">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/soulTable.css">
<link rel="stylesheet" type="text/css" href="../../statics/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/common.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/list-search-table.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-soul-table/docs/soulTable.css" media="all"/>-->
<script type="text/javascript" src="../../statics/plugins/jquery.min.js"></script>
<script type="text/javascript" src="../../statics/common/lib/vue.min.js"></script>
<script type="text/javascript" src="../../statics/plugins/ztree/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="../../statics/common/layui/layui.all.js"></script>
<script type="text/javascript" src="../../statics/common/js/axios.min.js"></script>
<script type="text/javascript" src="../../statics/common/js/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/common.js"></script>
<script type="text/javascript" src="../../statics/js/upload.js"></script>
<script type="text/javascript" src="../../statics/common/step/steps.js"></script>
<link rel="stylesheet" href="../../statics/css/jxcPublicAll.css"  media="all">
<link href="../../statics/common/photoviewer/dist/photoviewer.css" rel="stylesheet">
<link rel="stylesheet" href="../../statics/common/step/steps.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.css" media="all">-->
<link rel="stylesheet" href="../../statics/js/modules/cropper/cropper.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/css/viewer.min.css">
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.min.js"></script>-->
<script src="../../statics/js/modules/cropper/cropper.min.js"></script>
<script src="../../statics/common/photoviewer/dist/photoviewer.js"></script>
<script src="../../statics/common/layui/autocomplete.js"></script>
<script  src="../../statics/js/modules/viewer/viewer.min.js"></script>
<script src="../../statics/common/print-js/print.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../statics/common/print-js/print.min.css">
<script type="text/javascript" src="../../statics/common/xmselect/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/searchview.js"></script>
<script type="text/javascript" src="../../statics/js/tableedit.js"></script>

<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&type=webgl&ak=eo4XeZhRKHsQ0NOe6u6NkKscmRsk416B"></script>-->

<!-- 引入组件库 -->
<link rel="stylesheet" type="text/css" href="../../statics/css/index.css">






    <script src="../../statics/plugins/bootstrap-table.min.js"></script>
    <script src="../../statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="../../statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="../../statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="../../statics/plugins/treegrid/tree.table.js"></script>
</head>
<body class="ren-body">
<div id="rrapp" v-cloak>

    <blockquote class="layui-elem-quote quoteBox">
        <form class="layui-form">
            <section class="jxc-section">
                <div class="card">
                    <div class="layui-row form-group">
                        <div class="layui-form-item layui-row">
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">机构名称:</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" @click="deptTree" v-model="q.orgName" placeholder="请选择机构" readonly="readonly" />
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">公告标题:</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" v-model="q.noticeTitle" placeholder="请输入公告标题" />
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">发布状态:</label>
                                <div class="layui-input-inline">
                                    <select  v-model="q.publishStatus"  lay-filter="publishStatusSelect">
                                        <option value="">请选择发布状态</option>
                                        <option value="0">待发布</option>
                                        <option value="1">已发布</option>
                                        <option value="2">已撤销</option>
                                    </select>
                                </div>
                            </div>
<!--                        </div>-->
<!--                        <div class="layui-form-item">-->
                            <div class="layui-inline layui-col-md12 layui-col-sm12 layui-col-xs12">
                                <label class="layui-form-label"></label>
                                <a class="layui-btn search_btn" @click="query">查询</a>
                                <a class="layui-btn search_btn" @click="reset">重置</a>
                                <mperm v-m-perm="['sys:tcompanynotice:save']">
                                <a class="layui-btn search_btn" @click="add">新增</a>
                                </mperm>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </form>
    </blockquote>
<table class="layui-hide" id="grid" lay-filter="grid"></table>

<!-- 表单 -->
<form v-show="editForm" class="layui-form ren-form" id="editForm">

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: red">*</span>公告标题:</label>
        <div class="layui-input-inline">
            <input type="text" lay-verify="required" v-model="tCompanyNotice.noticeTitle" autocomplete="off" placeholder="公告标题" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: red">*</span>公告正文:</label>
        <div class="layui-input-block">
            <textarea lay-verify="required" style="width: 800px;height: 200px" v-model="tCompanyNotice.noticeContent" maxlength="5000"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: red">*</span>机构:</label>
        <div class="layui-input-inline">
            <input type="hidden" v-model = "tCompanyNotice.orgId" >
            <input type="text" lay-verify="required" v-model="tCompanyNotice.orgName" autocomplete="off" placeholder="选择机构" class="layui-input" @click="deptTree">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <a class="layui-btn layui-btn-normal" @click="cancel" >取消</a>
            <button class="layui-btn" lay-submit lay-filter="saveOrUpdate">保存</button>
            <button class="layui-btn" lay-submit lay-filter="saveOrUpdateAndPublish">保存并发布</button>
        </div>
    </div>
</form>


    <form v-show="detailForm" class="layui-form ren-form" id="detailForm">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">公告标题:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="tCompanyNotice.noticeTitle" autocomplete="off"    class="layui-input" style="border: none;" readonly>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">公告正文:</label>
                <div class="layui-input-inline">
                    <textarea style="width: 800px;height: 200px">{{tCompanyNotice.noticeContent || '-'}}</textarea>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">发布人:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="tCompanyNotice.publishName" autocomplete="off"  class="layui-input" style="border: none;" readonly>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">发布时间:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="tCompanyNotice.publishTime" autocomplete="off"  class="layui-input" style="border: none;" readonly>
                </div>
            </div>
        </div>
    </form>
</div>
<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
    <ul id="deptTree" class="ztree"></ul>
</div>
<!--操作-->
<script type="text/html" id="barTpl">
    <mperm v-m-perm="['sys:tcompanynotice:update']">
    <a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
    </mperm>
    <mperm v-m-perm="['sys:tcompanynotice:info']">
    <a class="layui-btn layui-btn-xs" lay-event="view">详情</a>
    </mperm>
    <mperm v-m-perm="['sys:tcompanynotice:update']">
        {{#  if(d.publishStatus == '0' || d.publishStatus == '2'){ }}
            <a class="layui-btn layui-btn-xs" lay-event="pubs">发布</a>
        {{#  } }}
    </mperm>
    <!--<mperm v-m-perm="['sys:tcompanynotice:update']">
        {{#  if(d.publishStatus == '1'){ }}
            <a class="layui-btn layui-btn-xs" lay-event="cancel">撤销</a>
        {{#  } }}
    </mperm>-->
</script>

<script src="../../statics/js/modules/sys/notice.js?_${.now?long}"></script>
</body>
</html>